package cn.com.Kol.ITPMP.TenMajorAreas.model;

import cn.com.Kol.ITPMP.System.Area;
import cn.com.Kol.ITPMP.System.Process;

import static cn.com.Kol.ITPMP.System.Constants.*;

public class HumanResourceManagement extends Area {

    private Process MakeHumanResourcePlan = new Process(MAKE_HUMAN_RESOURCE_PLAN);
    private Process AcquireProjectTeam = new Process(ACQUIRE_PROJECT_TEAM);
    private Process DevelopProjectTeam = new Process(DEVELOP_PROJECT_TEAM);
    private Process ManageProjectTeam = new Process(MANAGE_PROJECT_TEAM);

    private void HumanResourceManagementProcess(){
        CreateProcess(MakeHumanResourcePlan);
        CreateProcess(AcquireProjectTeam);
        CreateProcess(DevelopProjectTeam);
        CreateProcess(ManageProjectTeam);
    }

    public void SetInputs(Process process){
        switch (process.getProcessName()){
            case "规划人力资源管理":
                process.inputs(PROJECT_MANAGEMENT_PLAN);
                process.inputs(ACTIVITY_RESOURCE_REQUIREMENTS);
                process.inputs(ENTERPRISE_ENVIRONMENTAL_FACTORS);
                process.inputs(ORGANIZATIONAL_PROCESS_ASSETS);
                break;
            case "项目团队组建":
                process.inputs(HUMAN_RESOURCE_MANAGEMENT_PLAN);
                process.inputs(ENTERPRISE_ENVIRONMENTAL_FACTORS);
                process.inputs(ORGANIZATIONAL_PROCESS_ASSETS);
                break;
            case "项目团队建设":
                process.inputs(HUMAN_RESOURCE_MANAGEMENT_PLAN);
                process.inputs(PROJECT_STAFF_ASSIGNMENTS);
                process.inputs(RESOURCE_CALENDAR);
                break;
            case "项目团队管理":
                process.inputs(HUMAN_RESOURCE_MANAGEMENT_PLAN);
                process.inputs(PROJECT_STAFF_ASSIGNMENTS);
                process.inputs(TEAM_PERFORMANCE_EVALUATION);
                process.inputs(ISSUE_LOG);
                process.inputs(WORK_PERFORMANCE_REPORT);
                process.inputs(ORGANIZATIONAL_PROCESS_ASSETS);
                break;

        }
    }

    public void UseToolAndTech(Process process){
        switch (process.getProcessName()){
            case "规划人力资源管理":
                process.useToolAndTech(ORGANIZATION_CHART_AND_POSITION_DESCRIPTION);
                process.useToolAndTech(INTERPERSONAL_COMMUNICATION);
                process.useToolAndTech(ORGANIZATION_THEORY);
                process.useToolAndTech(EXPERT_JUDGEMENT);
                process.useToolAndTech(CONFERENCE);
                break;
            case "项目团队组建":
                process.useToolAndTech(PRE_ASSIGNMENT);
                process.useToolAndTech(NEGOTIATION);
                process.useToolAndTech(RECRUIT);
                process.useToolAndTech(VIRTUAL_TEAM);
                process.useToolAndTech(MULTI_CRITERIA_DECISION_ANALYSIS);
                break;
            case "项目团队建设":
                process.useToolAndTech(INTERPERSONAL_RELATIONSHIP_SKILLS);
                process.useToolAndTech(TRAIN);
                process.useToolAndTech(TEAM_BUILDING_ACTIVITY);
                process.useToolAndTech(BASIC_RULES);
                process.useToolAndTech(CENTRALIZED_OFFICE_WORK);
                process.useToolAndTech(RECOGNITION_AND_AWARDS);
                process.useToolAndTech(PERSONNEL_ASSESSMENT_TOOLS);
                break;
            case "项目团队管理":
                process.useToolAndTech(OBSERVATION_AND_CONVERSATION);
                process.useToolAndTech(PROJECT_PERFORMANCE_EVALUATION);
                process.useToolAndTech(CONFLICT_MANAGEMENT);
                process.useToolAndTech(INTERPERSONAL_RELATIONSHIP_SKILLS);
                break;


        }
    }

    public void SetOutputs(Process process){
        switch (process.getProcessName()){
            case "规划人力资源管理":
                process.outputs(HUMAN_RESOURCE_MANAGEMENT_PLAN);
                break;
            case "项目团队组建":
                process.outputs(PROJECT_STAFF_ASSIGNMENTS);
                process.outputs(RESOURCE_CALENDAR);
                process.outputs(PROJECT_MANAGEMENT_PLAN_UPDATE);
                break;
            case "项目团队建设":
                process.outputs(TEAM_PERFORMANCE_EVALUATION);
                process.outputs(ENTERPRISE_ENVIRONMENTAL_FACTORS_UPDATE);
                break;
            case "项目团队管理":
                process.outputs(CHANGE_REQUESTS);
                process.outputs(PROJECT_MANAGEMENT_PLAN_UPDATE);
                process.outputs(PROJECT_FILE_UPDATE);
                process.outputs(ENTERPRISE_ENVIRONMENTAL_FACTORS_UPDATE);
                process.outputs(ORGANIZATIONAL_PROCESS_ASSETS_UPDATE);
                break;


        }

    }

}
